package com.jmag.nop.orderweb.feign;

import com.jmag.nop.service.common.annotation.ApiMapping;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @author jmag
 */
@FeignClient(value = "account-server")
public interface TAccountApi {

    /**
     * 扣减账户余额
     * @param userId 用户id
     * @param money 金额
     * @return
     */
    //@RequestMapping("/account/decrease")
    @RequestMapping(value = "/account/decrease")
    String decrease(@RequestParam("userId") Long userId, @RequestParam("money") BigDecimal money);
}
